/**
 * @Project : algorithm-learning
 * @Author : Ruoyu Wang
 * @User : Momenta
 * @DateTime : 2024/4/16 16:19
 */

#include <iostream>
#include <vector>

using namespace std;

class Solution {
public:
    bool isSubsequence(string s, string t) {
        if (s.size() == 0) return true;
        if (s.size() > t.size())return false;
        int ss = 0;
        for (int i = 0; i < t.size(); ++i) {
            if (s[ss] == t[i]) {
                ss++;
                if (ss == s.size())return true;
            }
        }
        return false;
    }
};